package com.ruoyi.common.exception;

import com.ruoyi.common.exception.base.BaseException;

/**
 * 全局异常
 *
 * @author ruoyi
 */
public class GlobalException extends BaseException
{

    private static final long serialVersionUID = 1L;

    /**
     * 错误提示
     */
    private String message;

    /**
     * 错误明细，内部调试错误
     * <p>
     * 和 {@link CommonResult#getDetailMessage()} 一致的设计
     */
    private String detailMessage;


    public GlobalException(String message)
    {
        super("global", message, null, null);
    }

    public String getDetailMessage()
    {
        return detailMessage;
    }

    public GlobalException setDetailMessage(String detailMessage)
    {
        this.detailMessage = detailMessage;
        return this;
    }

    public String getMessage()
    {
        return super.getMessage();
    }

    public GlobalException setMessage(String message)
    {
        this.message = message;
        return this;
    }
}
